this.add_child(this._controls);
}
- animateToOverview(callback) {
- this._controls.animateToOverview(callback);
+ animateToOverview(state, callback) {
+ this._controls.animateToOverview(state, callback);
}
animateFromOverview(callback) {
// show:
//
// Animates the overview visible and grabs mouse and keyboard input
- show() {
+ show(state = OverviewControls.ControlsState.WINDOW_PICKER) {
+ if (state === OverviewControls.ControlsState.HIDDEN)
+ throw new Error('Invalid state, use hide() to hide');
+
if (this.isDummy)
return;
if (this._shown)
return;
Main.layoutManager.showOverview();
- this._animateVisible();
+ this._animateVisible(state);
}
- _animateVisible() {
+ _animateVisible(state) {
if (this._visible || this._animationInProgress)
return;
Meta.disable_unredirect_for_display(global.display);
- this._overview.animateToOverview(() => this._showDone());
+ this._overview.animateToOverview(state, () => this._showDone());
Main.layoutManager.overviewGroup.set_child_above_sibling(
this._coverPane, null);
this._workspaceAdjustment.value = activeIndex;
}
- animateToOverview(callback) {
+ animateToOverview(state, callback) {
this.viewSelector.prepareToEnterOverview();
this._stateAdjustment.value = ControlsState.HIDDEN;
- this._stateAdjustment.ease(ControlsState.WINDOW_PICKER, {
+ this._stateAdjustment.ease(state, {
duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => {